<?php

namespace app\mall\ui\form;

/**
 * 商城广告表单
 */
class MallAdvForm
{
    public function title()
    {
        return [
            'type' => 'input',
            'title' => '广告标题',
            'field' => 'title',
        ];
    }

    public function linkurl()
    {
        return [
            'type' => 'input',
            'title' => '链接地址',
            'field' => 'linkurl',
        ];
    }

    public function image()
    {
        return [
            'type' => 'uploadImage',
            'action' => config('thinkAdmin.upload_url'),
            'title' => '广告图片',
            'field' => 'image',
        ];
    }

    public function start_time()
    {
        return [
            'type' => 'dateTime',
            'title' => '开始时间',
            'field' => 'start_time',
        ];
    }

    public function end_time()
    {
        return [
            'type' => 'dateTime',
            'title' => '结束时间',
            'field' => 'end_time',
        ];
    }

    public function pos_id()
    {
        return [
            'type' => 'input',
            'title' => '广告位id',
            'field' => 'pos_id',
        ];
    }

    public function inx()
    {
        return [
            'type' => 'number',
            'title' => '排序',
            'field' => 'inx',
        ];
    }
}